<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>猜年龄</title>
	</head>
	<body>
		<script>
			var i = Math.floor(Math.random()*100);
			while(true){
				var j = parseInt(prompt("请您猜:"));
				if(i == j){
					alert("厉害了！");
					break;
				}else if(i>j){
					alert("小了点");
				}else{
					alert("大了点");
				}
			}
		</script>
	</body>
</html>
